const { defineConfig } = require('@vue/cli-service')
const path = require('path')// 引入path模块
module.exports = defineConfig({
  transpileDependencies: true,
  lintOnSave: false,
  configureWebpack: {
    resolve: {
      alias: {
        '@': path.resolve(__dirname, 'src'),
      }
    }
  },
  devServer: {
    port: 12581,
    proxy: {
      '/movies-server': {
        target: 'http://localhost:8080',
        changeOrigin: true,
        // 重写请求
        pathRewrite: {
          '^/movies-server': ''
        }
      }
    }
  }
})
